package cn.anecansaitin.jep.parser.ast.node.statement;

import cn.anecansaitin.jep.Token;
import cn.anecansaitin.jep.parser.ast.node.expression.Expression;
import cn.anecansaitin.jep.parser.ast.node.expression.Identifier;

public class VariableDeclaration extends Statement {
    private final Token type;
    private final Identifier name;
    private final Expression initializer;

    public VariableDeclaration(Token type, Identifier name, Expression initializer, int line, int column) {
        super(line, column);
        this.type = type;
        this.name = name;
        this.initializer = initializer;
    }

    public Token type() {
        return type;
    }

    public Identifier name() {
        return name;
    }

    public Expression initializer() {
        return initializer;
    }
}